import http from "@/api";
import { ApiSysDictionaryGetString } from "@/api/apis/sys_dictionary";
import { ReqSysDictionaryGetString } from "@/api/interface/SysDictionary/ReqSysDictionaryGetString";
import { ApiSysCommonGetSiteInfo } from "@/api/apis/sys_common";
import { ReqSearch } from "@/api/interface/Search/ReqSearch";
import { ResPage } from "@/api/interface";
import { dtoSysDictionaryInfo } from "@/api/dbdto/dtoSysDictionary";
import { ApiSysDictionarySearch } from "@/api/apis/sys_dictionary";
import { ReqSysCommonSaveConfigs } from "@/api/interface/Common/ReqSysCommonSaveConfigs";
import { ReqSysCommonGetConfigs } from "@/api/interface/Common/ReqSysCommonGetConfigs";
import { ApiSysCommonGetConfigs, ApiSysCommonSaveConfigs } from "@/api/apis/sys_common";

export const requestSysCommonGetSiteInfo = () => {
  return http.post(ApiSysCommonGetSiteInfo, {});
};

//保存配置的值
export const requestSysCommonSaveConfigs = (mapData: any) => {
  let params: ReqSysCommonSaveConfigs = {
    data: mapData
  };
  return http.post<ResPage<dtoSysDictionaryInfo>>(ApiSysCommonSaveConfigs, params);
};

//获取配置的值
export const requestSysCommonGetConfigs = (keys: Array<string>) => {
  let params: ReqSysCommonGetConfigs = {
    keys: keys
  };
  return http.post<ResPage<dtoSysDictionaryInfo>>(ApiSysCommonGetConfigs, params);
};
